import request from '@/utils/service'

export default {
  async getHouse(data) {
    return await request({
      url: '/api/house',
      method: 'get',
      params: data
    })
  },
  async getBuilding() {
    return await request({
      url: '/api/house/building',
      method: 'get'
    })
  },
  async addHouse(data) {
    return await request({
      url: '/api/house/',
      method: 'post',
      data
    })
  },
  async change(data) {
    return await request({
      url: '/api/house/' + data._id,
      method: 'patch',
      data
    })
  }
}
